//
//  DestinationAreaCell.m
//  TravelToHelp
//
//  Created by lanou3g on 15/10/28.
//  Copyright © 2015年 冯贵宾. All rights reserved.
//

#import "DestinationAreaCell.h"

@implementation DestinationAreaCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
    
        self.photoImageView = [[UIImageView alloc] initWithFrame:CGRectMake(5, 3, kScreenWidth - 10, 220)];
        self.photoImageView.layer.cornerRadius = 20;
        self.photoImageView.layer.masksToBounds = YES;
        [self.contentView addSubview:self.photoImageView];
        
        
        
        self.titleLable = [[UILabel alloc] initWithFrame:CGRectMake(0, self.photoImageView.height - 30, self.photoImageView.width, 30)];
        self.titleLable.textAlignment = NSTextAlignmentCenter;
        self.titleLable.textColor = [UIColor whiteColor];
        self.titleLable.font = [UIFont systemFontOfSize:20];
        self.titleLable.alpha = 0.7;
        [self.photoImageView addSubview:self.titleLable];
        
    }
    return self;
}

- (void)setModel:(DestinationAreaModel *)model
{
    self.photoImageView.image = [UIImage imageNamed:model.imageName];
    self.titleLable.text = model.title;
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
